<script>
    $(function() {
        $( ".calendario" ).datepicker();
    });
</script>
<?php
echo $this->Form->create('Account');
echo $this->Form->hidden("Account.contract_id", array('value' => $contract_id));
?>
<table id="tabla">
    <tbody>
        <tr>
            <td><?php echo $this->Form->input("Account.user_id", array('class' => 'required', 'empty' => 'Seleccione', 'label' => 'Persona que revisa')); ?></td>
            <td><?php echo $this->Form->input("Account.monto", array('label' => 'Monto')); ?> </td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input("Account.fecha_cuenta", array('label' => 'Fecha de la cuenta de cobro', 'class' => 'calendario', 'type' => 'text')); ?></td>
            <td><?php echo $this->Form->input("Account.fecha_inicio", array('label' => 'Fecha de inicio', 'class' => 'calendario', 'type' => 'text')); ?></td>
        </tr>
        <tr>
            <td><?php echo $this->Form->input("Account.fecha_final", array('label' => 'Fecha finalización', 'class' => 'calendario', 'type' => 'text')); ?></td>
            <td><?php echo $this->Form->input("Account.numero_planilla", array('label' => 'Número de planilla', 'type' => 'text')); ?></td>
        </tr>  
    </tbody>
</table>

<?php
echo $this->Ajax->submit('Guardar', array('url' => array('controller' => 'Accounts', 'action' => 'add', $contract_id), 'update' => 'content', 'indicator' => 'loading'));
echo $this->Form->end();
echo $this->Ajax->link($this->Html->image("regresar.gif", array('width' => '30', 'heigth' => '30', 'alt' => 'Regresar')), array('controller' => "Accounts", "action" => "index", $this->Session->read('contrato')), array('update' => 'content', 'indicator' => 'loading', 'escape' => false), null)
?>